package com.smallstep.hystrix.init;

import com.smallstep.hystrix.properties.FFHystrixProperties;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.Ordered;

/**
 * @author 李俊
 * @Description
 * @Date 2019/8/28 9:41
 */
public class FFHystrixApplicationContextInitializer
        implements ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered {
    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        FFHystrixProperties.setEnvironment(configurableApplicationContext.getEnvironment());
    }

    @Override
    public int getOrder() {
        return -2147483648;
    }
}
